import Notification from './notification'


let messageInstance;

function getMessageInstance() {
  // 这一步的目的是当有多个Alert被创建时都在同一个div上
  messageInstance =
    messageInstance || Notification.newInstance();
  return messageInstance;
}
function notice({ duration = 1.5, content = '' }) {
  let instance = getMessageInstance();

  instance.add({
    content,
    duration
  })
}
// export default {
//   info(options) {
//     return notice(options)
//   }
// }
export default notice